#include "rsalgorithmthread.h"

void RSFuncCallBack(const int dValue , const char* pMsg , void * pProgressArg )
{
    RSAlgorithmThread* pThread = static_cast<RSAlgorithmThread*>( pProgressArg );
    if ( nullptr != pThread )
    {
        pThread->emitDisPoseState(dValue , pMsg);
    }
}

RSAlgorithmThread::RSAlgorithmThread()
{
}

void RSAlgorithmThread::run()
{
    if ( nullptr != m_pRSAlg )
    {
        m_pRSAlg->setFunctionCallBack( RSFuncCallBack , this );
        m_pRSAlg->disPose();
    }
}

void RSAlgorithmThread::emitDisPoseState(const int nValue, const QString &strMsg)
{
    emit updateDisPoseState( nValue , strMsg );
}
